﻿FlyTalk.views.MainView = Ext.extend(Ext.Panel, {
    fullscreen: true,
    layout: 'card',
    cardSwitchAnimation: 'slide',
    initComponent: function () {

		Ext.apply(FlyTalk.views, {
			HomeView: new FlyTalk.views.HomeView(),          // home view
			TalkView: new FlyTalk.views.TalkView(),          // flight talk, mytalk, bored
			//TalkBoredView: new FlyTalk.views.TalkBoredView(),          // flight talk, mytalk, bored
			SearchSearchView: new FlyTalk.views.SearchSearchView(),      // search, ask, find
			ProfView: new FlyTalk.views.ProfView(),          // profile
			ItinMapView: new FlyTalk.views.ItinMapView(),    // itinerary + map
			ServicesView: new FlyTalk.views.ServicesView(),  // services
			SettingView: new FlyTalk.views.SettingView(),    // settings (currently, used to test other functionality)
			PostView: new FlyTalk.views.PostView(),          // sub: open thread page
			ComposeView: new FlyTalk.views.ComposeView(),    // sub: review form
			QuestionForm: new FlyTalk.views.QuestionForm(),  // sub: question form
			MapView: new FlyTalk.views.MapView(),            // sub: suggestion form
			BoredView: new FlyTalk.views.BoredView(),        // sub: menu overlay
			NotificationView: new FlyTalk.views.NotificationView(),  
			ModeSelection: new FlyTalk.views.ModeSelection(), 
			ItinDetailView: new FlyTalk.views.ItinDetailView(),
			RestaurantView: new FlyTalk.views.RestaurantView(),
			HelpOutView: new FlyTalk.views.HelpOutView(),
			SearchView: new FlyTalk.views.SearchView(),
			Servicelaitaliana: new FlyTalk.views.Servicelaitaliana(),
			Servicepastaperfecto: new FlyTalk.views.Servicepastaperfecto(),
			Serviceperfumeire: new FlyTalk.views.Serviceperfumeire(),
			ServiceMap: new FlyTalk.views.ServiceMap(),
			Serviceguisepe: new FlyTalk.views.Serviceguisepe(),
			Servicedefault: new FlyTalk.views.Servicedefault(),
			PublicProf: new FlyTalk.views.PublicProf(),
			LocView: new FlyTalk.views.LocView(),
			MapZoom: new FlyTalk.views.MapZoom(),
			//HelpView: new FlyTalk.views.HelpView(), 
			//MyTalkView: new FlyTalk.views.MyTalkView(),
        });

        this.items = [
            FlyTalk.views.HomeView,       // home
			FlyTalk.views.TalkView,       // flight talk, mytalk, bored
			//FlyTalk.views.TalkBoredView,       // flight talk, mytalk, bored
			FlyTalk.views.SearchSearchView,     // search, ask, find
			FlyTalk.views.ProfView,       // profile
			FlyTalk.views.ItinMapView,       // itinerary + map
			FlyTalk.views.ServicesView,   // services
			FlyTalk.views.SettingView,    // settings
			FlyTalk.views.PostView,       // sub: open thread page
			FlyTalk.views.ComposeView,    // sub: review form
			//FlyTalk.views.QuestionForm,   // sub: question form
			FlyTalk.views.MapView,        // sub: suggestion form
			FlyTalk.views.BoredView,      // sub: menu overlay
			FlyTalk.views.NotificationView,
			FlyTalk.views.ModeSelection,
			FlyTalk.views.ItinDetailView,
			FlyTalk.views.RestaurantView,
			FlyTalk.views.HelpOutView,
			FlyTalk.views.SearchView,
			FlyTalk.views.Servicelaitaliana,
			FlyTalk.views.Servicepastaperfecto,
			FlyTalk.views.Serviceperfumeire,
			FlyTalk.views.Serviceguisepe,
			FlyTalk.views.ServiceMap,
			FlyTalk.views.Servicedefault,
			FlyTalk.views.PublicProf,
			FlyTalk.views.LocView,
			FlyTalk.views.MapZoom,//Map
			//FlyTalk.views.HelpView, 
		//	FlyTalk.views.MyTalkView,
        ];
		this.timebar = new Ext.Panel({
			/*html: '<center><div style="padding-top: 5px;font-size: small">Process time: 38 min. TAP001 boards in 55 min.</div></center>',*/
			/*html: [
				'<div style="padding-top: 5px;font-size: small">TAP001 boards in 55 min. Process time: 38 min. </div>',
				'<div style="padding-top: 5px;font-size: small">TAP001 boards in 55 min. Process time: 38 min. </div>'
				],*/
			/*html: [
				'<div id="timebar">',
					'<div id="timebar-leftleft"><span class="timebar-text-large">TAP001</span><br /><span class="timebar-text-small">Boards at </span><span style="font-size: 30px; font-weight: bold; color: #3d9ba1; line-height: 75%;">0:15</span></div>',
					'<div id="timebar-left"><span class="timebar-text-large">Spare Time</span><br /><span class="timebar-text-small">(estimated)</span></div><div id="timebar-right">0:15</div>',
				'</div>'
				],*/
			html: [
				'<div id="timebar">',
					'<div style="float: left; position: relative; left: 5px">',
						'<div style="float:left; position: relative; top: 3px">',
							'<span style="color:#ffffff; float:right; font-size: 14px; font-weight: light;">TAP013</span><br/>',
							'<span style="color:#ffffff; float:right; font-size:10px; font-weight: light; margin-top:-5px">Boards at</span>',
						'</div>',
						'<div style="color:#3d9ba1; float:right; font-size: 30px; font-weight: bold; padding:0 2px 0 2px">12:30</div>',
					'</div>',
					'<div style="float: right;  position: relative; right: 5px">',
						'<div style="float: left; margin-bottom: -10px;  relative; top: 3px">',
							'<span style="color:#ffffff; float:right; font-size: 14px; font-weight: light;">Spare time</span><br/>',
							'<span style="color:#ffffff; float:right; font-size:10px; font-weight: light; margin-top:-5px">(estimated)</span>',
						'</div>',
						'<div style="color:#3d9ba1; float:right; font-size: 30px; font-weight: bold; padding: 0 3px 0 3px;">0:25</div>',
					'</div>',
					'<div style="clear:both"></div>',
				'</div>'
				],
			dock: 'bottom',
			height: 40,
			width: 320,
			//layout: 'hbox',
		});

        this.dockedItems = [this.timebar];

        FlyTalk.views.MainView.superclass.initComponent.call(this);
		
		

    },
});